#ifndef __LISPCORE_H__
#define __LISPCORE_H__
#include<string>
#include<variant>
#include<memory>
namespace lisp::core{
    using namespace std;
    class cons;
    //万能类型
    using var = variant<nullptr_t, int, double, string, cons>;

    //万能指针
    using pointer = shared_ptr<var>;

    const nullptr_t nil = nullptr; 
    
    class cons :  pair<pointer, pointer>
    {
        using base = pair<pointer, pointer>;
        using base::base;
        using base::operator=;
    public:
        cons(pointer p_h, pointer p_t): base(make_pair(p_h, p_t)) {};
        pointer car() const ;
        pointer cdr() const ;
    };
}//lisp::core::

#endif // __LISPCORE_H__
